//
//  MainViewController.m
//  维度科技
//
//  Created by 谷银行 on 2019/1/23.
//  Copyright © 2019 谷银行. All rights reserved.
//

#import "MainViewController.h"

@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSArray *arr = @[@"资讯",@"消息",@"社区"];
    NSArray *VCarr = @[@"ZxViewController",@"XxViewController",@"SqViewController"];
    NSArray *arr1=@[@"common_tab_information_n_hdpi",@"common_tab_message_n_hdpi",@"common_tab_community_n_hdpi"];
    NSArray *arr2=@[@"common_tab_informatiion_s_hdpi",@"common_tab_message_s_hdpi",@"common_tab_community_s_hdpi"];
    NSMutableArray *MutableArr = [[NSMutableArray alloc]init];
    for (int i = 0; i<VCarr.count; i++) {
        UIViewController *vc = [[NSClassFromString(VCarr[i])alloc]init];
        UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
        nav.tabBarItem.image = [UIImage imageNamed:arr1[i]];
        nav.tabBarItem.selectedImage = [UIImage imageNamed:arr2[i]];
        nav.tabBarItem.title = arr[i];
        [MutableArr addObject:nav];
    }
    self.viewControllers = MutableArr;
}


@end
